home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / language / isetl.arc / infunc.t < prev    next >
Text File  |  1987-08-20  |  430b  |  20 lines

  1. program x;
  2.     print "Series and Sums";
  3.  
  4.     print "Enter the series function, as a function of one variable";
  5.     print "    Use the form " 
  6.       + "'func(i); return <some expression using i>; end;'";
  7.     read f;
  8.  
  9.     print "Enter the number of terms, N:";
  10.     read N;
  11.  
  12.     print ["i", "f(i)", "%+[ f(x): x in [1..i]]" ];
  13.     for i in [1..N] do
  14.     print [i, f(i), %+[ f(x): x in [1..i]] ];
  15.     end;
  16. end;
  17.  
  18. func(a); return a**2; end;
  19. 10;
  20.